package com.yl.controller;

import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.yl.model.Address;
import com.yl.service.IAddressService;
@ResponseBody
@Controller
public class AddressController {

	
	@Resource
	private IAddressService addressService;
	//显示所有地址
	@RequestMapping("/findAlladdress.do")
	public Map findAll() {
		return addressService.findAll();
	}
	//删除地址
	@RequestMapping("/deladdress.do")
	public int del(int address_id) {
		return addressService.del(address_id);
	}
	//添加地址
	@RequestMapping("/address.do")
	public int add(Address address) {
		return addressService.add(address);
	}
}
